﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using AteneoLibriBusinessLogic.Entities;

namespace AteneoLibriBusinessLogic.TOA
{
    public class MessageAssembler
    {

        public static Message Assembler(AteneoLibriEntityFramework.Message item)
        {
            Message m = new Message();

            m.IdMessage = item.IdMessage;
            m.UserIdSeller = item.UserIdSeller;
            m.UserIdPurchaser = item.UserIdPurchaser;
            m.TextMessage = item.TextMessage;
            m.Date = item.Date;
            m.SaleId = item.SaleId;
            m.WriteBy = item.WriteBy;
            
            return m;
        }

        public static AteneoLibriEntityFramework.Message DeAssembler(Message item)
        {
            AteneoLibriEntityFramework.Message m = new AteneoLibriEntityFramework.Message();

            m.IdMessage = item.IdMessage;
            m.UserIdSeller = item.UserIdSeller;
            m.UserIdPurchaser = item.UserIdPurchaser;
            m.TextMessage = item.TextMessage;
            m.Date = item.Date;
            m.SaleId = item.SaleId;
            m.WriteBy = item.WriteBy;

            return m;
        }
    }
}
